package com.imooc.mall.model.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class AddProductReq {

    @NotNull(message = "名称不能为空")
    private String name;

    @NotNull(message = "图片不能为空")
    private String image;

    private String detail;

    @NotNull(message = "商品分类不能为空")
    private Integer categoryId;

    @Min(value = 1, message = "价格不能少于1分")
    private Integer price;

    @Max(value = 1000, message = "库存最大10000")
    private Integer stock;

    private Integer status;
}
